package com.lc.mybatis.mapper;

import com.lc.mybatis.pojo.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ParameterMapper {

    List<User> getAllUser();

    //根据用户名查询用户
    User getUserByUsername(String uname);

    //根据用户名和密码查询用户
    User getUserByNameAndPwd(String name,String password);

    //形参为map
    User getUserByMap(Map<String,Object> map);

    //形参是一个类
    int insert(User user);

    //用注解
    User getUserByParam(@Param("username") String name, @Param("password") String password);


}
